import React, {Component} from 'react';
import {Text} from 'native-base';
import {isIos} from '../../../../utils/utils';
import {connect} from 'react-redux';
import {themeColor} from '../../../../config/config';

@connect(state => ({state: {...state.home}}))
class TabText extends Component {
	
	render() {
		let color = '#8c8c8c';
		let type = this.props.type;
		if(this.props.state.tab == type) {
			color = themeColor();
		}
		let style = {color: color, fontSize: 12};
		if(isIos()) {
			style.position = 'relative';
			style.top = 10;
		}
		return (
			<Text style={style} >
				{this.props.value}
			</Text>
		);
	}
	
}

export default TabText;
